const install = (Vue, vm) => {
    const http = vm.$u.http
    const basePath = vm.baseConfig.basePath
    const authPath = vm.baseConfig.authPath
    vm.$u.api = {
        // 字典
      dicts: params => http.request({ method: 'GET', url: basePath + '/system/dict/data/type/' + params }),
      account: {
        // 登录
        login: data => http.request({ method: 'POST', url: authPath + '/login', data: data, custom: { auth: false } }),
        //获取图形验证码
        getImage: () => http.request({ method: 'GET', url: authPath + '/captchaImage', custom: { auth: false } }),
        // 退出登录
        loginOut: () => http.request({ method: 'GET', url: authPath + '/logout' }),
      },
      ucenter: {
        // 查询用户个人信息
        profile: data => http.request({ method: 'GET', url: basePath + '/system/user/profile' }),
      },
    }
  }
  export default { install }
  